    //
//  ColorTextField.m
//  ZFPlatform
//
//  Created by magus on 11-6-1.
//  Copyright 2011 __MyCompanyName__. All rights reserved.
//

#import "CTextField.h"


@implementation CTextField

- (void) SetCornerRadius:(CGFloat) cornerRadius
{
	[self.layer setCornerRadius:cornerRadius];
}


- (void) SetBorderWidth:(CGFloat) borderWidth
{
	CGFloat offset = borderWidth - m_borderWidth;
	
	CGRect rect = [self bounds];
	rect.origin.x -= offset;
	rect.origin.y -= offset;
	rect.size.width += offset;
	rect.size.height += offset;
	
	[self setBounds:rect];
	[self.layer setBorderWidth:borderWidth];
	
	m_borderWidth = borderWidth;
}


- (void) SetBorderColor:(UIColor*) borderColor
{
	[self.layer setBorderColor:borderColor.CGColor];
}


- (void)dealloc {
    [super dealloc];
}


@end
